Optimal. Leaf size=160 \[ -\frac {\left (A-\sqrt {a} B\right ) \log \left (-\sqrt {3} \sqrt [4]{a} x+\sqrt {a}+x^2\right )}{4 \sqrt {3} a^{3/4}}+\frac {\left (A-\sqrt {a} B\right ) \log \left (\sqrt {3} \sqrt [4]{a} x+\sqrt {a}+x^2\right )}{4 \sqrt {3} a^{3/4}}-\frac {\left (\sqrt {a} B+A\right ) \tan ^{-1}\left (\sqrt {3}-\frac {2 x}{\sqrt [4]{a}}\right )}{2 a^{3/4}}+\frac {\left (\sqrt {a} B+A\right ) \tan ^{-1}\left (\frac {2 x}{\sqrt [4]{a}}+\sqrt {3}\right )}{2 a^{3/4}} \]
________________________________________________________________________________________
Rubi [A] time = 0.12, antiderivative size = 160, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 5, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {1169, 634, 617, 204, 628} \begin {gather*} -\frac {\left (A-\sqrt {a} B\right ) \log \left (-\sqrt {3} \sqrt [4]{a} x+\sqrt {a}+x^2\right )}{4 \sqrt {3} a^{3/4}}+\frac {\left (A-\sqrt {a} B\right ) \log \left (\sqrt {3} \sqrt [4]{a} x+\sqrt {a}+x^2\right )}{4 \sqrt {3} a^{3/4}}-\frac {\left (\sqrt {a} B+A\right ) \tan ^{-1}\left (\sqrt {3}-\frac {2 x}{\sqrt [4]{a}}\right )}{2 a^{3/4}}+\frac {\left (\sqrt {a} B+A\right ) \tan ^{-1}\left (\frac {2 x}{\sqrt [4]{a}}+\sqrt {3}\right )}{2 a^{3/4}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 617
Rule 628
Rule 634
Rule 1169
Rubi steps
\begin {align*} \int \frac {A+B x^2}{a-\sqrt {a} x^2+x^4} \, dx &=\frac {\int \frac {\sqrt {3} \sqrt [4]{a} A-\left (A-\sqrt {a} B\right ) x}{\sqrt {a}-\sqrt {3} \sqrt [4]{a} x+x^2} \, dx}{2 \sqrt {3} a^{3/4}}+\frac {\int \frac {\sqrt {3} \sqrt [4]{a} A+\left (A-\sqrt {a} B\right ) x}{\sqrt {a}+\sqrt {3} \sqrt [4]{a} x+x^2} \, dx}{2 \sqrt {3} a^{3/4}}\\ &=\frac {1}{4} \left (\frac {A}{\sqrt {a}}+B\right ) \int \frac {1}{\sqrt {a}-\sqrt {3} \sqrt [4]{a} x+x^2} \, dx+\frac {1}{4} \left (\frac {A}{\sqrt {a}}+B\right ) \int \frac {1}{\sqrt {a}+\sqrt {3} \sqrt [4]{a} x+x^2} \, dx-\frac {\left (A-\sqrt {a} B\right ) \int \frac {-\sqrt {3} \sqrt [4]{a}+2 x}{\sqrt {a}-\sqrt {3} \sqrt [4]{a} x+x^2} \, dx}{4 \sqrt {3} a^{3/4}}+\frac {\left (A-\sqrt {a} B\right ) \int \frac {\sqrt {3} \sqrt [4]{a}+2 x}{\sqrt {a}+\sqrt {3} \sqrt [4]{a} x+x^2} \, dx}{4 \sqrt {3} a^{3/4}}\\ &=-\frac {\left (A-\sqrt {a} B\right ) \log \left (\sqrt {a}-\sqrt {3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt {3} a^{3/4}}+\frac {\left (A-\sqrt {a} B\right ) \log \left (\sqrt {a}+\sqrt {3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt {3} a^{3/4}}+\frac {\left (A+\sqrt {a} B\right ) \operatorname {Subst}\left (\int \frac {1}{-\frac {1}{3}-x^2} \, dx,x,1-\frac {2 x}{\sqrt {3} \sqrt [4]{a}}\right )}{2 \sqrt {3} a^{3/4}}-\frac {\left (A+\sqrt {a} B\right ) \operatorname {Subst}\left (\int \frac {1}{-\frac {1}{3}-x^2} \, dx,x,1+\frac {2 x}{\sqrt {3} \sqrt [4]{a}}\right )}{2 \sqrt {3} a^{3/4}}\\ &=-\frac {\left (A+\sqrt {a} B\right ) \tan ^{-1}\left (\sqrt {3}-\frac {2 x}{\sqrt [4]{a}}\right )}{2 a^{3/4}}+\frac {\left (A+\sqrt {a} B\right ) \tan ^{-1}\left (\sqrt {3}+\frac {2 x}{\sqrt [4]{a}}\right )}{2 a^{3/4}}-\frac {\left (A-\sqrt {a} B\right ) \log \left (\sqrt {a}-\sqrt {3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt {3} a^{3/4}}+\frac {\left (A-\sqrt {a} B\right ) \log \left (\sqrt {a}+\sqrt {3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt {3} a^{3/4}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.13, size = 138, normalized size = 0.86 \begin {gather*} \frac {\sqrt [4]{-1} \left (\frac {\left (\left (\sqrt {3}-i\right ) \sqrt {a} B-2 i A\right ) \tan ^{-1}\left (\frac {(1+i) x}{\sqrt {\sqrt {3}-i} \sqrt [4]{a}}\right )}{\sqrt {\sqrt {3}-i}}-\frac {\left (\left (\sqrt {3}+i\right ) \sqrt {a} B+2 i A\right ) \tanh ^{-1}\left (\frac {(1+i) x}{\sqrt {\sqrt {3}+i} \sqrt [4]{a}}\right )}{\sqrt {\sqrt {3}+i}}\right )}{\sqrt {6} a^{3/4}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A+B x^2}{a-\sqrt {a} x^2+x^4} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.68, size = 1141, normalized size = 7.13
result too large to display
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.04, size = 198, normalized size = 1.24 \begin {gather*} \frac {B \arctan \left (\frac {2 x +\sqrt {3}\, a^{\frac {1}{4}}}{a^{\frac {1}{4}}}\right )}{2 a^{\frac {1}{4}}}-\frac {B \arctan \left (\frac {-2 x +\sqrt {3}\, a^{\frac {1}{4}}}{a^{\frac {1}{4}}}\right )}{2 a^{\frac {1}{4}}}-\frac {\sqrt {3}\, B \ln \left (x^{2}+\sqrt {3}\, a^{\frac {1}{4}} x +\sqrt {a}\right )}{12 a^{\frac {1}{4}}}+\frac {\sqrt {3}\, B \ln \left (-x^{2}+\sqrt {3}\, a^{\frac {1}{4}} x -\sqrt {a}\right )}{12 a^{\frac {1}{4}}}+\frac {A \arctan \left (\frac {2 x +\sqrt {3}\, a^{\frac {1}{4}}}{a^{\frac {1}{4}}}\right )}{2 a^{\frac {3}{4}}}-\frac {A \arctan \left (\frac {-2 x +\sqrt {3}\, a^{\frac {1}{4}}}{a^{\frac {1}{4}}}\right )}{2 a^{\frac {3}{4}}}+\frac {\sqrt {3}\, A \ln \left (x^{2}+\sqrt {3}\, a^{\frac {1}{4}} x +\sqrt {a}\right )}{12 a^{\frac {3}{4}}}-\frac {\sqrt {3}\, A \ln \left (-x^{2}+\sqrt {3}\, a^{\frac {1}{4}} x -\sqrt {a}\right )}{12 a^{\frac {3}{4}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {B x^{2} + A}{x^{4} - \sqrt {a} x^{2} + a}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.99, size = 1155, normalized size = 7.22 \begin {gather*} -2\,\mathrm {atanh}\left (\frac {6\,A^2\,x\,\sqrt {\frac {B^2\,\sqrt {-27\,a^3}}{72\,a^2}-\frac {B^2}{24\,\sqrt {a}}-\frac {A^2\,\sqrt {-27\,a^3}}{72\,a^3}-\frac {A^2}{24\,a^{3/2}}-\frac {A\,B}{6\,a}}}{2\,A^2\,B-2\,B^3\,a+\frac {A^3}{\sqrt {a}}-A\,B^2\,\sqrt {a}+\frac {A^3\,\sqrt {-27\,a^3}}{3\,a^2}-\frac {A\,B^2\,\sqrt {-27\,a^3}}{3\,a}}-\frac {6\,B^2\,a\,x\,\sqrt {\frac {B^2\,\sqrt {-27\,a^3}}{72\,a^2}-\frac {B^2}{24\,\sqrt {a}}-\frac {A^2\,\sqrt {-27\,a^3}}{72\,a^3}-\frac {A^2}{24\,a^{3/2}}-\frac {A\,B}{6\,a}}}{2\,A^2\,B-2\,B^3\,a+\frac {A^3}{\sqrt {a}}-A\,B^2\,\sqrt {a}+\frac {A^3\,\sqrt {-27\,a^3}}{3\,a^2}-\frac {A\,B^2\,\sqrt {-27\,a^3}}{3\,a}}-\frac {2\,A^2\,x\,\sqrt {-27\,a^3}\,\sqrt {\frac {B^2\,\sqrt {-27\,a^3}}{72\,a^2}-\frac {B^2}{24\,\sqrt {a}}-\frac {A^2\,\sqrt {-27\,a^3}}{72\,a^3}-\frac {A^2}{24\,a^{3/2}}-\frac {A\,B}{6\,a}}}{3\,a^{3/2}\,\left (2\,A^2\,B-2\,B^3\,a+\frac {A^3}{\sqrt {a}}-A\,B^2\,\sqrt {a}+\frac {A^3\,\sqrt {-27\,a^3}}{3\,a^2}-\frac {A\,B^2\,\sqrt {-27\,a^3}}{3\,a}\right )}+\frac {2\,B^2\,x\,\sqrt {-27\,a^3}\,\sqrt {\frac {B^2\,\sqrt {-27\,a^3}}{72\,a^2}-\frac {B^2}{24\,\sqrt {a}}-\frac {A^2\,\sqrt {-27\,a^3}}{72\,a^3}-\frac {A^2}{24\,a^{3/2}}-\frac {A\,B}{6\,a}}}{3\,\sqrt {a}\,\left (2\,A^2\,B-2\,B^3\,a+\frac {A^3}{\sqrt {a}}-A\,B^2\,\sqrt {a}+\frac {A^3\,\sqrt {-27\,a^3}}{3\,a^2}-\frac {A\,B^2\,\sqrt {-27\,a^3}}{3\,a}\right )}\right )\,\sqrt {\frac {B^2\,\sqrt {-27\,a^3}}{72\,a^2}-\frac {B^2}{24\,\sqrt {a}}-\frac {A^2\,\sqrt {-27\,a^3}}{72\,a^3}-\frac {A^2}{24\,a^{3/2}}-\frac {A\,B}{6\,a}}-2\,\mathrm {atanh}\left (\frac {6\,A^2\,x\,\sqrt {\frac {A^2\,\sqrt {-27\,a^3}}{72\,a^3}-\frac {B^2}{24\,\sqrt {a}}-\frac {A^2}{24\,a^{3/2}}-\frac {B^2\,\sqrt {-27\,a^3}}{72\,a^2}-\frac {A\,B}{6\,a}}}{2\,A^2\,B-2\,B^3\,a+\frac {A^3}{\sqrt {a}}-A\,B^2\,\sqrt {a}-\frac {A^3\,\sqrt {-27\,a^3}}{3\,a^2}+\frac {A\,B^2\,\sqrt {-27\,a^3}}{3\,a}}-\frac {6\,B^2\,a\,x\,\sqrt {\frac {A^2\,\sqrt {-27\,a^3}}{72\,a^3}-\frac {B^2}{24\,\sqrt {a}}-\frac {A^2}{24\,a^{3/2}}-\frac {B^2\,\sqrt {-27\,a^3}}{72\,a^2}-\frac {A\,B}{6\,a}}}{2\,A^2\,B-2\,B^3\,a+\frac {A^3}{\sqrt {a}}-A\,B^2\,\sqrt {a}-\frac {A^3\,\sqrt {-27\,a^3}}{3\,a^2}+\frac {A\,B^2\,\sqrt {-27\,a^3}}{3\,a}}+\frac {2\,A^2\,x\,\sqrt {-27\,a^3}\,\sqrt {\frac {A^2\,\sqrt {-27\,a^3}}{72\,a^3}-\frac {B^2}{24\,\sqrt {a}}-\frac {A^2}{24\,a^{3/2}}-\frac {B^2\,\sqrt {-27\,a^3}}{72\,a^2}-\frac {A\,B}{6\,a}}}{3\,a^{3/2}\,\left (2\,A^2\,B-2\,B^3\,a+\frac {A^3}{\sqrt {a}}-A\,B^2\,\sqrt {a}-\frac {A^3\,\sqrt {-27\,a^3}}{3\,a^2}+\frac {A\,B^2\,\sqrt {-27\,a^3}}{3\,a}\right )}-\frac {2\,B^2\,x\,\sqrt {-27\,a^3}\,\sqrt {\frac {A^2\,\sqrt {-27\,a^3}}{72\,a^3}-\frac {B^2}{24\,\sqrt {a}}-\frac {A^2}{24\,a^{3/2}}-\frac {B^2\,\sqrt {-27\,a^3}}{72\,a^2}-\frac {A\,B}{6\,a}}}{3\,\sqrt {a}\,\left (2\,A^2\,B-2\,B^3\,a+\frac {A^3}{\sqrt {a}}-A\,B^2\,\sqrt {a}-\frac {A^3\,\sqrt {-27\,a^3}}{3\,a^2}+\frac {A\,B^2\,\sqrt {-27\,a^3}}{3\,a}\right )}\right )\,\sqrt {\frac {A^2\,\sqrt {-27\,a^3}}{72\,a^3}-\frac {B^2}{24\,\sqrt {a}}-\frac {A^2}{24\,a^{3/2}}-\frac {B^2\,\sqrt {-27\,a^3}}{72\,a^2}-\frac {A\,B}{6\,a}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: PolynomialError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________